<?php
/**
 * Galdic project
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Galdic
 * @package    Galdic
 * @copyright  Copyright (c) 2009 vifito (http://vifito.eu)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/**
 * Admin_Bootstrap
 * 
 * @package    Galdic
 * @copyright  Copyright (c) 2009 vifito (http://vifito.eu)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Bootstrap.php 1 2009-09-15 01:13:00Z vifito $
 */
class Admin_Bootstrap extends Zend_Application_Module_Bootstrap
{
    protected function _initAutoload()
    {
        $moduleLoader = new Zend_Application_Module_Autoloader(
            array(
                'namespace' => 'Admin',
                'basePath'  => APPLICATION_PATH . '/modules/admin'
            )
        );
        
        return $moduleLoader;
    }    
    
    protected function _initViewHelpers()
    {
        // Session
        Zend_Session::start();        
        $session = new Zend_Session_Namespace('GalDic');
        Zend_Registry::set('session', $session);
        
        // Change layout
        $layout = Zend_Layout::getMvcInstance();
        $layout->setLayout('admin');
    }
}

